package evolution.executor;

import java.util.concurrent.Callable;

import evolution.algorithm.EvolutionaryAlgorithm;

public class EvolutionaryAlghorithmEpochRunner implements Callable<Void> {
	private int epochLength;
	private EvolutionaryAlgorithm evolutionaryAlghorithm;

	@Override
	public Void call() throws Exception {
		for (int i = 0; i < epochLength; i++) {
			evolutionaryAlghorithm.runIteration();
		}
		return null;
	}

	public EvolutionaryAlgorithm getEvolutionaryAlghorithm() {
		return evolutionaryAlghorithm;
	}

	public void setEvolutionaryAlghorithm(
			EvolutionaryAlgorithm evolutionaryAlghorithm) {
		this.evolutionaryAlghorithm = evolutionaryAlghorithm;
	}

	public int getEpochLength() {
		return epochLength;
	}

	public void setEpochLength(int epochLength) {
		this.epochLength = epochLength;
	}

}
